<?php 
    include ("config.inc.php");
    
    // capture data from form and store in variables
	$minutes      = toMinutes(escape('minutes'));
    $completed    = escape('completed');
    $a_id         = escape('who');
    $p_id         = escape('p_id');
	$u_id         = escape('u_id');
	$workdate     = escape('workdate');

	$update = "SELECT who,completed,minutes FROM work WHERE"
	$work = "INSERT INTO work (p_id,a_id,workdate,minutes) VALUES ($p_id,$a_id,$workdate,$minutes)";
	mysql_query($work) or die(mysql_error());
	
	$values = array (
			"minutes" => $minutes,
			"who" => $a_id,
			"completed" => $completed
			//etc
	);
	echo json_encode($values);
?>